CC:=gcc

perror_test:perror_test.c
	$(CC) -o $@ $<
	-./$@
	-rm -rf $@ 

uname_pipe: uname_pipe.c
	$(CC) -o $@ $<
	-./$@ "hello"
	-rm -rf $@

hee : mkfifo_write.c mkfifo_read.c
	$(CC) -o mkfifo_write  mkfifo_write.c
	$(CC) -o mkfifo_read  mkfifo_read.c

share_memory: share_memory.c
	$(CC) -o $@ $< -lrt
	-./$@ 
	-rm -rf $@

mq_test: mq_test.c
	$(CC) -o $@ $^ -lrt
	-./$@ 
	-rm -rf $@

mq_send_receive.o: mq_send_receive.h

produce.o:mq_send_receive.h
 
customer.o:mq_send_receive.h

produce: produce.o mq_send_receive.o
	$(CC) -o $@ $^ -lrt

customer: customer.o mq_send_receive.o
	$(CC) -o $@ $^ -lrt

clean:
	-rm -rf *.o

signal_test: signal_test.c
	$(CC) -o $@ $<
	-./$@ 
	-rm -rf $@

